//数组中的方法

//转换成字符串
//1.方法(函数)的参数 
//2.方法的返回值
//console.log(arr.toString());
//var num = 18;
//toString() 参数 2/8/10/16
//           返回值  字符串
//console.log(num.toString(2));
//join
/*
console.log( arr.join('|') );
var arr2 = ['lilei','hanmeimei'];
var arr3 = ['scot','chris'];
console.log(arr.concat(arr2,arr3));

console.log(arr.slice(2,4));//start ~ end-1
*/

//start 开始下标 count个数
//console.log(arr.splice(2,2));
//console.log(arr.splice(2,2,'Jone','richard'));
//console.log(arr);
//var arr = ['tom','jerry','david','lucy','white'];
//改变原数组
//arr.reverse();//翻转数据
//console.log(arr);
//var arr = [5,17,8,13,26,9];
//arr.sort();//默认按照Unicode码
/*
arr.sort(function(a,b){
  //return a-b;//从小到大
  return b-a;
});
console.log(arr);
*/
//进出栈  
var arr = ['tom','jerry','david','lucy','white'];
//arr.push('scot');
//arr.pop();
//arr.pop();
//arr.unshift('scot');
arr.shift();
console.log(arr);








